// 通用配置
// 针对通用的接口做代理
const arrCommonProxyPath = [
    '/logger',
    '/menu',
    '/sign',
    '/supply-demand',
    '/materials',
    '/categories',
    '/captcha',
    '/sms-code',
    '/user',
    '/auth',
    '/reconciliation',
    '/mm',
    '/upload-token',
    '/procurement',
    '/order',
    '/purchase-collection',
    '/upload-token',
    '/bid',
    '/cw',
    '/tenders',
    '/cm',
    '/qc',
    '/organization',
    '/bm',
    '/wxxqx',
    '/address',
    '/wx',
    '/web-api-compatible',
];

// 特殊配置
// 针对一些特殊的接口（如上传）
// path想通的情况下，会覆盖通用配置
const proxyTable = {
    '/special-path': {
        target: 'http://localhost:8081',
        secure: false,
        changeOrigin: true
    }
};

arrCommonProxyPath.forEach(item => {
    if (proxyTable[item]) {
        return;
    }
    proxyTable[item] = {
        target: 'http://localhost:18080',
        secure: false,
        changeOrigin: true
    };
});

module.exports = proxyTable;